var app = getApp()
Page({
  data: {
    tempid: '',
    isPullDownRefresh: false,
  },
  onLoad: function (e) {
    var that = this;
    if (!app.globalData.plumSession) {
      app.wechatSq(that);
    } else {
      app.setPageviewlink(that, '');
    }
  },
  onShow: function () {
    app.setCartnum();//更新购物车数量
  },
  onPullDownRefresh: function () {
    var that = this;
    that.setData({
      isPullDownRefresh: true
    });
    setTimeout(function () {
      wx.stopPullDownRefresh();
      that.setData({
        isPullDownRefresh: false
      });
    }, 600)
  },
  onShareAppMessage: function () {
    var that = this;
    var title = '';
    var shareInfo = app.globalData.shareInfo;
    title = shareInfo.shareTitle ? shareInfo.shareTitle : title;
    var cover = shareInfo.shareCover ? shareInfo.shareCover : '';
    app.getPoint(that);
    return {
      title: title,
      imageUrl: cover,
      path: '/pages/webviewTab2/webviewTab2'
    }
  }
})